#include "SocketInstance.h"


SocketInstance::SocketInstance(SOCKET passedsockfd): sockfd(passedsockfd), closed(false), reference(0)
{
	IncreaseReference();
}


SocketInstance::~SocketInstance()
{
}

SOCKET SocketInstance::GetSocket() const
{
	return sockfd;
}

bool SocketInstance::IsClosed() const
{
	return closed;
}

void SocketInstance::Close()
{
	closed = true;
}

int SocketInstance::GetReferenceCount() const
{
	return reference;
}

void SocketInstance::IncreaseReference()
{
	reference++;
}

void SocketInstance::DecreaseReference()
{
	reference--;
}

